package com.huazi.educms.controller;

import com.huazi.commonutils.CommentResult;
import com.huazi.educms.entity.CrmBanner;
import com.huazi.educms.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author shkstart
 * @create 2021-03-25 14:13
 */
@RestController
@CrossOrigin
@RequestMapping("/educms/bannerFrom")
public class BannerFromController {
    @Autowired
    CrmBannerService crmBannerService;


    //查询

    @GetMapping("getBannerFroms")
    public CommentResult getBannerFroms(){
        List<CrmBanner> bannerFroms = crmBannerService.getBannerFroms();
        return CommentResult.getOK().data("list",bannerFroms);
    }
}
